QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Types

Labels

ASCII
Type
Binary
type ( = 0x74797065 )

Data Format

Int32               typeID
String              owner
typeID
A negative integer. No two type objects in the same file may have the same value in this field.
owner
An ISO 9070 owner string. The value of this field may not occur in any other type object. The string must not contain a # character, which is used to demarcate comments in 3DMF.

Data Size

4 + sizeof(String)

Description

Type objects are used only in conjunction with custom objects, and have a role only in binary metafiles. The purpose of the type object is to establish a correlation between the dynamically-allocated 4-byte type identifiers used to identify types in binary metafiles, and the text string type identifiers that are the fundamental type identifiers in 3DMF and QD3D. That the text string is the sole identifier of a custom type, and the 4-byte quantity is only dynamic, is a feature that is new in Version 1.5. By dynamic we mean that the 4-byte identifier is created anew each time the custom object is registered by an application. A key point is that the 4-byte type identifier need not be constant from metafile to metafile, or from session to session. The 4-byte type identifiers are negative numbers, starting with -1 and decreasing by 1.

The reason there is no need for type objects in text metafiles is that the 4-byte identifiers do not appear at all in text metafiles. So there is no need for a type object that establishes a correlation between a 4-byte identifier and a text string identifier.

This functionality, which is new in Version 1.5, is reflected in the new ways of registering custom objects in QD3D 1.5. Otherwise, it is transparent to the user of the QD3D API.

 

 

 

 

 

Parent Hierarchy

3DMF.

Parent Objects

None.

Child Objects

None.

Example

Offset

Hexadecimal code

ASCII

0000

3344 4D46 2020 2010 2001 2005 2020 2020

3DMF············

0010

2020 2020 2020 2070 7479 7065 2020 2014

·······ptype····

0020

FFFF FFFB 4375 7374 6F6D 203A 2045 6C65

····Custom·:·Ele

0030

6D44 2020 636E 7472 2020 2028 7365 7420

mD··cntr···(set·

0040

2020 2020 636E 7472 2020 2018 FFFF FFFB

····cntr········

0050

2020 2004 2020 2001 696E 7470 2020 2004

········intp····

0060

2020 2001 7266 726E 2020 2004 2020 2001

····rfrn········

0070

746F 6320 2020 202C 2020 2020 2020 2020

toc····,········

0080

2020 2002 FFFF FFFF 2020 2001 2020 2010

················

0090

2020 2001 2020 2001 2020 2020 2020 2034

···············4

00A0

7365 7420

set·


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |